package com.zlq.cn.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;

/**
 * <p>
 *
 * </p>
 *
 * @author zhoucl
 * @since 2021-09-02
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("riddle")
public class Riddle extends Model<Riddle> {

    private static final long serialVersionUID = 1L;

    /**
     * 谜语id
     */
    @TableId(value = "riddle_id", type = IdType.AUTO)
    private Integer riddleId;

    /**
     * 谜面
     */
    private String title;

    /**
     * 谜底
     */
    private String answer;

    /**
     * 类型id
     */
    private Integer riddleTypeId;


    @Override
    protected Serializable pkVal() {
        return this.riddleId;
    }

}
